package main

import (
	"fmt"
	"github.com/gin-gonic/gin"
	_ "im_project/configs"
	"im_project/internal"
	"im_project/internal/app"
	"im_project/routers"
	"log"
	"os"
	"os/exec"
	"strings"
)

func getCurrentPath() string {
	s, err := exec.LookPath(os.Args[0])
	log.Println(err)
	i := strings.LastIndex(s, "\\")
	path := string(s[0 : i+1])
	return path
}
func main() {

	path := getCurrentPath()
	fmt.Println(path)
	internal.InitConfig()
	//internal.InitFile()

	go app.SendMessage()

	r := gin.Default()
	routers.InitRouters(r)

}
